<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Bel_Model_Tree</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Bel_Model_Tree</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Tree structure model.</p>
<p class="description"><p>Tree algorythm is nested sets (http://en.wikipedia.org/wiki/Nested_set_model)</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Konstantin Shamko &lt;<a href="mailto:konstantin.shamko@gmail.com">konstantin.shamko@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> 0.0.1</li>
				<li><span class="field">copyright:</span> Copyright (c) 2009 Konstantin Shamko</li>
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">license:</span> New</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Libs---Bel---Model---Tree.php.html">/Libs/Bel/Model/Tree.php</a> (line <span class="field">14</span>)
		</p>
		
				
		<pre>Zend_Db_Table_Abstract
   |
   --<a href="../Bel/Bel_Model_Abstract.html">Bel_Model_Abstract</a>
      |
      --Bel_Model_Tree</pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Usermanagement/Model/Models_Usermanagement_Modules.html">Models_Usermanagement_Modules</a></td>
					<td>
											Model for module/controller/action management in a admin area.
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$errors" title="details" class="var-name">$errors</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table" title="details" class="var-name">$table</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$table_add_fields" title="details" class="var-name">$table_add_fields</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table_id" title="details" class="var-name">$table_id</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table_left" title="details" class="var-name">$table_left</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table_level" title="details" class="var-name">$table_level</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table_right" title="details" class="var-name">$table_right</a>
				</div>
																<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$_maxlevel" title="details" class="var-name">$_maxlevel</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																				
												<div class="method-definition">
											<span class="method-result">Bel_Model_Tree</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">array</span>&nbsp;<span class="var-name">$array</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#addNode" title="details" class="method-name">addNode</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$parent_node</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$node_name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#ChangePositionAll" title="details" class="method-name">ChangePositionAll</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id1</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$id2</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$position</span> = <span class="var-default">'after'</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$condition</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#deleteNode" title="details" class="method-name">deleteNode</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#editNode" title="details" class="method-name">editNode</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$node_id</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$request</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getErrors" title="details" class="method-name">getErrors</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getIdCol" title="details" class="method-name">getIdCol</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getNodeInfo" title="details" class="method-name">getNodeInfo</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getParentBranch" title="details" class="method-name">getParentBranch</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$addcond</span> = <span class="var-default">''</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getTree" title="details" class="method-name">getTree</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">''</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getTreeBranch" title="details" class="method-name">getTreeBranch</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$addcond</span> = <span class="var-default">''</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#moveNode" title="details" class="method-name">moveNode</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$ID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$newParentId</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">''</span>])
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$errors" id="$errors"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$errors</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">51</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array with errors</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table" id="$table"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table</span>
						(line <span class="line-number">21</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of a table where tree is storing</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_add_fields" id="$table_add_fields"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$table_add_fields</span>
						(line <span class="line-number">63</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Additional fields in table (all except id, left_key, right_key and level)</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_id" id="$table_id"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table_id</span>
						(line <span class="line-number">45</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Primary key of a 'tree' table</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_left" id="$table_left"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table_left</span>
						(line <span class="line-number">27</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of a 'left_key' column (see nested set alg)</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_level" id="$table_level"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table_level</span>
						(line <span class="line-number">39</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of a 'level' column (see nested set alg)</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_right" id="$table_right"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table_right</span>
						(line <span class="line-number">33</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Name of a 'right_key' column (see nested set alg)</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_maxlevel" id="$_maxlevel"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$_maxlevel</span>
			 = <span class="var-default"> 0</span>			(line <span class="line-number">57</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Max available level in tree structure (0 - infinite). Set in constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Usermanagement/Model/Models_Usermanagement_Modules.html#var$_maxlevel">Models_Usermanagement_Modules::$_maxlevel</a>
								: Defines max depth level
							</li>
				</ul>
		

</div>
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../Bel/Bel_Model_Abstract.html">Bel_Model_Abstract</a></span></p>
					<blockquote>
													<span class="var-title">
								<span class="var-name"><a href="../Bel/Bel_Model_Abstract.html#var$_db">Bel_Model_Abstract::$_db</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../Bel/Bel_Model_Abstract.html#var$_items_on_page">Bel_Model_Abstract::$_items_on_page</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../Bel/Bel_Model_Abstract.html#var$_name">Bel_Model_Abstract::$_name</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">69</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Bel_Model_Tree</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">array</span>&nbsp;<span class="var-name">$array</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$array</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../Bel/Bel_Model_Abstract.html#method__construct">Bel_Model_Abstract::__construct()</a></dt>
						<dd>Constructor.</dd>
					</dl>
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Usermanagement/Model/Models_Usermanagement_Modules.html#method__construct">Models_Usermanagement_Modules::__construct()</a>
								: Constructor to set table with modules/controllers/actions
							</li>
				</ul>
	</div>
<a name="methodaddNode" id="addNode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addNode</span> (line <span class="line-number">140</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds new child node to specified parent node</p>
	<ul class="tags">
				<li><span class="field">return:</span> - new node id</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			addNode
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$parent_node</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$node_name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$parent_node</span><span class="var-description">: - id of a parent node</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$node_name</span><span class="var-description">: - new node name</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$request</span>			</li>
				</ul>
		
			
	</div>
<a name="methodChangePositionAll" id="ChangePositionAll"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">ChangePositionAll</span> (line <span class="line-number">318</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Swapping nodes within the same level and limits of one parent with all its children: $id1 placed before or after $id2.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE if successful, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			ChangePositionAll
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id1</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$id2</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$position</span> = <span class="var-default">'after'</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$condition</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$id1</span><span class="var-description">: first item ID</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$id2</span><span class="var-description">: second item ID</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$position</span><span class="var-description">: 'before' or 'after' $id2</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$condition</span><span class="var-description">: Array structure: array('and' =&gt; array('id = 0', 'id2 &gt;= 3'), 'or' =&gt; array('sec = \'www\'', 'sec2 &lt;&gt; \'erere\'')), etc where array key - condition (AND, OR, etc), value - condition string</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddeleteNode" id="deleteNode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">deleteNode</span> (line <span class="line-number">173</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes node and all it's children</p>
	<ul class="tags">
				<li><span class="field">return:</span> - true if ok, otherwise false</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			deleteNode
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$node_id</span><span class="var-description">: - node id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodeditNode" id="editNode"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">editNode</span> (line <span class="line-number">212</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Updates node record</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			editNode
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$node_id</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$node_id</span><span class="var-description">: - id of the entry to edit</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$request</span><span class="var-description">: - assosiative array with field=&gt;value pairs</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Usermanagement/Model/Models_Usermanagement_Modules.html#methodeditNode">Models_Usermanagement_Modules::editNode()</a>
								: Updates modules' record
							</li>
				</ul>
	</div>
<a name="methodgetErrors" id="getErrors"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getErrors</span> (line <span class="line-number">388</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return errors</p>
	<ul class="tags">
				<li><span class="field">return:</span> - array with errors`</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getErrors
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetIdCol" id="getIdCol"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getIdCol</span> (line <span class="line-number">380</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return primary key field name</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getIdCol
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../Bel/Bel_Model_Abstract.html#methodgetIdCol">Bel_Model_Abstract::getIdCol()</a></dt>
						<dd>Return table's primary key field name</dd>
					</dl>
			
	</div>
<a name="methodgetNodeInfo" id="getNodeInfo"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getNodeInfo</span> (line <span class="line-number">226</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return node info</p>
	<ul class="tags">
				<li><span class="field">return:</span> - array with node data</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getNodeInfo
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$node_id</span><span class="var-description">: - node id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetParentBranch" id="getParentBranch"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getParentBranch</span> (line <span class="line-number">119</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array with parent branch of a specified node</p>
	<ul class="tags">
				<li><span class="field">return:</span> - branch data</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getParentBranch
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$addcond</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$node_id</span><span class="var-description">: - id of a specified node</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$addcond</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetTree" id="getTree"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getTree</span> (line <span class="line-number">82</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array of all tree nodes. This array contains: node id, node level, node left key, node right key,  previous node id (with same level as current), next node id (with same level as current) and other data  (depends on your table)</p>
	<ul class="tags">
				<li><span class="field">return:</span> - tree data</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getTree
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$condition</span><span class="var-description">: - condition string. use it to select data sets (see nested sets alg)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetTreeBranch" id="getTreeBranch"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getTreeBranch</span> (line <span class="line-number">98</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array with specified node with it's all children</p>
	<ul class="tags">
				<li><span class="field">return:</span> - branch data</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getTreeBranch
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$node_id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$addcond</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$node_id</span><span class="var-description">: - id of a specified node</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$addcond</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmoveNode" id="moveNode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">moveNode</span> (line <span class="line-number">246</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Assigns a node with all its children to another parent.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE if successful, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			moveNode
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$ID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$newParentId</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$ID</span><span class="var-description">: node ID</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$newParentId</span><span class="var-description">: ID of new parent node</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$condition</span><span class="var-description">: Array structure: array('and' =&gt; array('id = 0', 'id2 &gt;= 3'), 'or' =&gt; array('sec = \'www\'', 'sec2 &lt;&gt; \'erere\'')), etc where array key - condition (AND, OR, etc), value - condition string</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../Bel/Bel_Model_Abstract.html">Bel_Model_Abstract</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#method__construct">Bel_Model_Abstract::__construct()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodaddEntry">Bel_Model_Abstract::addEntry()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodbulkDeleteById">Bel_Model_Abstract::bulkDeleteById()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methoddeleteEntryById">Bel_Model_Abstract::deleteEntryById()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodgetAll">Bel_Model_Abstract::getAll()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodgetEntryById">Bel_Model_Abstract::getEntryById()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodgetIdCol">Bel_Model_Abstract::getIdCol()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodgetItemsOnPage">Bel_Model_Abstract::getItemsOnPage()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodgetPaging">Bel_Model_Abstract::getPaging()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodsetItemsOnPage">Bel_Model_Abstract::setItemsOnPage()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodsetSelectMethod">Bel_Model_Abstract::setSelectMethod()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#methodupdateEntry">Bel_Model_Abstract::updateEntry()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#method_prepareRequest">Bel_Model_Abstract::_prepareRequest()</a></span><br>
													<span class="method-name"><a href="../Bel/Bel_Model_Abstract.html#method_selectQuery">Bel_Model_Abstract::_selectQuery()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 01 Mar 2010 18:58:53 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>